<template>
  <div class="report">
    <div class="report-title">
      <div style="display: flex;">
        <div style="color: black" class="report-title-date" :style="{width:index === 0 ? '15%' : 'calc(80%/8)'}"
             v-for="(item,index) in reportDate" :key="index" v-text="item">
        </div>
      </div>
    </div>
    <div class="report-body">
      <div v-for="(item,index) in reportList" :key="index">
        <div style="padding: 0 20px;background: #FBFAE5;margin-top: 2em">
          <div class="report-body-offer-title">
            <div style="width: 15%;color: #1684FD ">{{ item.offerList.offerName }}</div>
            <div style="color: black" class="report-body-offer" :style="{width:'calc(80%/8)'}"
                 v-for="(it,i) in item.offerList.data" :key="i" v-text="it">
            </div>
          </div>
        </div>
        <div v-for="(it,i) in item.userList" class="report_user_border"
             :style="{background: i%2 !== 1? '#F9F9F9':'#ffffff'}">
          <div class="report-body-offer-title">
            <div style="width: 15%;">{{ it.userName }}</div>
            <div style="color: black" class="report-body-offer" :style="{width:'calc(80%/8)'}"
                 v-for="(it,i) in it.data" :key="i" v-text="it">
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import {accountoperator} from "@/api/business/account";

export default {
  name: "accountoperator",
  data() {
    return {
      reportDate: [],
      reportList: [],
    }
  },
  mounted() {
    this.reportDate = ['', '2022-1-3', '2022-1-4', '2022-1-5', '2022-1-6', '2022-1-7', '2022-1-8', '2022-1-9', '7日总计', '12月总计'];
    this.reportList = [
      {
        offerList: {
          offerName: '订单00001111',
          data: [
            '6.00', '123.00', '123.00', '123.00', '123.00', '123.00', '123.00', '861.00', '861.00'
          ]
        },
        userList: [
          {
            userName: 'guppy',
            data: [
              '6.00', '123.00', '123.00', '123.00', '123.00', '123.00', '123.00', '861.00', '861.00'
            ]
          },
          {
            userName: 'guppy',
            data: [
              '6.00', '123.00', '123.00', '123.00', '123.00', '123.00', '123.00', '861.00', '861.00'
            ]
          },
          {
            userName: 'guppy',
            data: [
              '6.00', '123.00', '123.00', '123.00', '123.00', '123.00', '123.00', '861.00', '861.00'
            ]
          },
          {
            userName: 'guppy',
            data: [
              '6.00', '123.00', '123.00', '123.00', '123.00', '123.00', '123.00', '861.00', '861.00'
            ]
          }
        ]
      },
      {
        offerList: {
          offerName: '订单00001111',
          data: [
            '6.00', '123.00', '123.00', '123.00', '123.00', '123.00', '123.00', '861.00', '861.00'
          ]
        },
        userList: [
          {
            userName: 'guppy',
            data: [
              '6.00', '123.00', '123.00', '123.00', '123.00', '123.00', '123.00', '861.00', '861.00'
            ]
          },
          {
            userName: 'guppy',
            data: [
              '6.00', '123.00', '123.00', '123.00', '123.00', '123.00', '123.00', '861.00', '861.00'
            ]
          },
          {
            userName: 'guppy',
            data: [
              '6.00', '123.00', '123.00', '123.00', '123.00', '123.00', '123.00', '861.00', '861.00'
            ]
          },
          {
            userName: 'guppy',
            data: [
              '6.00', '123.00', '123.00', '123.00', '123.00', '123.00', '123.00', '861.00', '861.00'
            ]
          }
        ]
      }
    ]

  }
}
</script>

<style scoped lang="scss">

.report {
  font-size: 14px;
  line-height: 28px;
  width: 100%;

  //标题
  .report-title {
    background-color: #D0E7FF;
    padding: 0 20px;
    line-height: 40px;
    font-size: 14px;
    font-weight: 500;

    .report-title-date {
      text-align: center;
    }
  }

  //主体
  .report-body {
    .report-body-offer-title {
      display: flex;
      text-align: center;
      line-height: 40px;
      font-size: 14px;
    }

    .report_user_border {
      margin-top: -1px;
      padding: 0 20px;
      border: 1px solid rgba(232, 232, 232, 100);
      box-sizing: border-box;
    }
  }

}


</style>
